package com.feng.gaoerfu.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @time 2017/8/29 0029 14:44
 */

public class TableData implements Parcelable {
    public int defaullNum;

    public int numOfYards;
    public int numOfGan;
    public int numOfTui;
    public int numOfError;

    public TableData(int numOfYards, int numOfGan, int numOfTui, int numOfError,int defaullNum) {
        this.numOfYards = numOfYards;
        this.numOfGan = numOfGan;
        this.numOfTui = numOfTui;
        this.numOfError = numOfError;
        this.defaullNum = defaullNum;
    }

    @Override
    public String toString() {
        return "TableData{" +
                "defaullNum=" + defaullNum +
                ", numOfYards=" + numOfYards +
                ", numOfGan=" + numOfGan +
                ", numOfTui=" + numOfTui +
                ", numOfError=" + numOfError +
                '}';
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.defaullNum);
        dest.writeInt(this.numOfYards);
        dest.writeInt(this.numOfGan);
        dest.writeInt(this.numOfTui);
        dest.writeInt(this.numOfError);
    }

    protected TableData(Parcel in) {
        this.defaullNum = in.readInt();
        this.numOfYards = in.readInt();
        this.numOfGan = in.readInt();
        this.numOfTui = in.readInt();
        this.numOfError = in.readInt();
    }

    public static final Parcelable.Creator<TableData> CREATOR = new Parcelable.Creator<TableData>() {
        @Override
        public TableData createFromParcel(Parcel source) {
            return new TableData(source);
        }

        @Override
        public TableData[] newArray(int size) {
            return new TableData[size];
        }
    };
}
